const path = require('path')
const fs = require('fs')

module.exports = {
	transpileDependencies: ["@stablelib", "@stablelib/chacha20poly1305", "idea-cipher"],
	devServer: {
		host: '0.0.0.0',
		port: 8081,
		https: true,
		proxy: {
			'/api': {
				// target: 'http://111.22.161.115:3100',//'http://192.168.0.201:8888',
				// target: 'http://192.168.0.95:8888',//'http://192.168.0.201:8888',
				target: 'http://192.168.0.105:8888',//'http://192.168.0.201:8888',
				changeOrigin: true,
				ws: false,
				pathRewrite: {
					'^/api': ''
				}
			},
			'/getF': {
				// target: 'http://111.22.161.115:3100',//'http://192.168.0.201:8888',
				// target: 'http://192.168.0.95:8888',//'http://192.168.0.201:8888',
				target: 'http://192.168.0.105:8888',//'http://192.168.0.201:8888',
				changeOrigin: true,
				ws: false,
				pathRewrite: {
				}
			},
			'/boxim': {
				// target: 'http://111.22.161.115:3100',//'http://' + process.env.VUE_APP_WS_URL,
				// target: 'http://192.168.0.95:8878',//'http://' + process.env.VUE_APP_WS_URL,
				target: 'http://192.168.0.105:8878',//'http://' + process.env.VUE_APP_WS_URL,
				changeOrigin: true,
				ws: true,
				pathRewrite: {
				}
			}
		}
	}

}